package com.knightcloud.micro.auth.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.knightcloud.common.base.entity.OrmBaseBean;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.time.Instant;

/**
 * oauth2客户端
 *
 * @author knight
 */
@Getter
@Setter
@TableName("oauth2_registered_client")
@EqualsAndHashCode(callSuper = true)
public class Oauth2RegisteredClient extends OrmBaseBean {

	@TableId(value = "id")
	private String id;

	/**
	 * 客户端id
	 */
	private String clientId;

	/**
	 * 客户端秘钥
	 */
	private String clientSecret;

	/**
	 * 客户秘钥发行时间
	 */
	private Instant clientIdIssuedAt;

	/**
	 * 客户秘钥过期时间
	 */
	private Instant clientSecretExpiresAt;

	/**
	 * 客户端名称
	 */
	private String clientName;

	/**
	 * 客户端身份验证方法
	 */
	private String clientAuthenticationMethods;

	/**
	 * 授权批准类型
	 */
	private String authorizationGrantTypes;

	/**
	 * 重定向的uri
	 */
	private String redirectUris;

	/**
	 * 作用域
	 */
	private String scopes;

	/**
	 * 客户端设置
	 */
	private String clientSettings;

	/**
	 * 令牌设置
	 */
	private String tokenSettings;

}
